<template>
	<div>
	<div class="header">
		<div class="nav-search">
			<a href="#" ><img src="/img/logo.svg" class="logo"></a>
			<div class="search-left">
				<ul class="ul-top">
					<li style="margin-left: 10px">首页</li>
					<span class="span-line"></span>
					<li>新房</li>
					<span class="span-line"></span>
					<li>二手房</li>
					<span class="span-line"></span>
					<li>租房</li>
					<span class="span-line"></span>
					<li>商品写字楼</li>
					<span class="span-line"></span>
					<li>海外地产</li>
					<span class="span-line"></span>
					<li>贷款</li>
					<span class="span-line"></span>
					<li>回答</li>
				</ul>
			</div>
			<div class="search-right">
				<ul class="ul-top">
					<li>
						<span>用户登录</span>
						<span class="login-logo"></span>					</li>
					<li><span class="span-line"></span>
						<a href="#" style="color: #666">
						<span class="glyphicon glyphicon-user" style="margin-right: 3px"></span>用户登录
						</a>
					</li>
					<li>
						<span style="margin-left: 10px;">注册</span>
					</li>
					<li>
						<a href="#" style="color: #666">
						<span class="glyphicon glyphicon-heart" style="margin-right: 3px;"></span>收藏夹

						</a>
						<span class="span-line"></span>
					</li>
				</ul>	
			</div>
		</div>
		<div class="nav-content">
			<ul class="content-ul">
				<li>安居客</li>
				<li>></li>
				<li>楼盘</li>
				<li>></li>
				<li>楼盘</li>
				<li>></li>
				<li>广汇 东湖城</li>
			</ul>
			<div class="search" style="float: right;">
				<div class="input-group">
			      <input type="text" class="form-control" placeholder="Recipient's username" aria-describedby="basic-addon2">
			      <span class="input-group-addon" id="basic-addon2">搜索</span>
    			</div>
			</div>
		</div>
		<div class="guanggao"><img src="https://pic4.ajkimg.com/display/xinfang/27049c3f01e93e6118f3ba27cb0ffe40/1180x160n.jpg" alt=""></div>
		<div class="nav-bottom">
			<ul class="bottom-ul">
				<a href="#"><li class="active-li">楼盘首页</li></a>
				<a href="#"><li>楼盘详情</li></a>
				<a href="#"><li>楼盘相册</li></a>
				<a href="#"><li>楼盘动态</li></a>
				<a href="#"><li>楼盘户型</li></a>
				<a href="#"><li>用户点评</li></a>
				<a href="#"><li>回答</li></a>
				<a href="#"><li>楼盘评测</li></a>
				<a href="#"><li>周边配套</li></a>
				<a href="#"><li>楼盘房源</li></a>
			</ul>
		</div>
	</div>

	<div class="content">
		 <div class="content-left">
			<div class="main-img">
				<img src="https://pic4.ajkimg.com/display/xinfang/5d4c3201f6b682fbb71f9cca0d56c930/600x450x98c.jpg">
			</div>
			<div class="sub-img" >
				<ul>
					<a href="#"><li><img src="https://pic4.ajkimg.com/display/xinfang/bbeaa4f413ff211d4e063ae7787fa3d5/90x65m.jpg"></li></a>
					<a href="#"><li><img src="https://pic4.ajkimg.com/display/xinfang/bbeaa4f413ff211d4e063ae7787fa3d5/90x65m.jpg"></li></a>
					<a href="#"><li><img src="https://pic4.ajkimg.com/display/xinfang/bbeaa4f413ff211d4e063ae7787fa3d5/90x65m.jpg"></li></a>
					<a href="#"><li><img src="https://pic4.ajkimg.com/display/xinfang/bbeaa4f413ff211d4e063ae7787fa3d5/90x65m.jpg"></li></a>
					<a href="#"><li><img src="https://pic4.ajkimg.com/display/xinfang/bbeaa4f413ff211d4e063ae7787fa3d5/90x65m.jpg"></li></a>
					<a href="#"><li><img src="https://pic4.ajkimg.com/display/xinfang/bbeaa4f413ff211d4e063ae7787fa3d5/90x65m.jpg"></li></a>

				</ul>
			</div>
		 </div>
		 <div class="content-right">
		 <!-- 在前台中设置后台传来的时间戳 -->

			<div class="sub-content">
				<div class="p-content"><span>价格</span><em></em>元/㎡</div>
			</div>
			<div class="sub-content">
				<div class="p-content"><span>开盘</span><span class="content-word">开盘时间待定</span><%=time2date(data.sale_time)-%>s</div>
			</div>
			<div class="sub-content">
				<div class="p-content"><span>交房</span><span class="content-word">交房时间待定</span><%=time2date(data.submit_time)-%>s</div>
			</div>
			<div class="sub-content">
				<div class="p-content"><span>户型</span><span class="content-word"><%=data.property_types-%></span></div>
			</div>
			<div class="sub-content">
				<div class="p-content"><span>地址</span><span class="content-word"><%=data.position_main-%> <%=data.position_second-%></span></div>
			</div>
		 </div>
	</div>
	<div class="nav-broker">
		<h2>置业顾问</h2> 
		<div class="broker-content">

			<img src="https://pic1.ajkimg.com/display/xinfang/15daa07f98b8729c8f3d1eb1efd7488a/80x80m.jpg" class="name-img">
			<div style="display: inline-block;"><span class="span-name">美嘉</span></div>
		</div>
	</div>
	<div class="nav-broker nav-huxing">
		<h2>楼盘户型</h2> 


		<div class="huxing-content">
			<div class="huxing-div">
				<a href="#" class="huxing-a">
				<img src="<%= aPorpertyImgPaths[i] -%>" class="huxing-img"></a>
				<h4 class="span-huxing"> </h4>

			</div>
		</div>
	</div>
	<% }%>

	<div class="nav-broker nav-huxing">
		<h2>猜你喜欢</h2> 
		<div class="huxing-content">
			<div class="huxing-div">
				<a href="#" class="huxing-a">
				<img src="https://pic4.ajkimg.com/display/xinfang/5c73e06957383286442edd35f9511d43/212x175m.jpg" class="huxing-img"></a>
				<h4 class="span-huxing">120㎡户型 </h4>

			</div>
			<div class="huxing-div">
				<a href="#" class="huxing-a">
				<img src="https://pic4.ajkimg.com/display/xinfang/5c73e06957383286442edd35f9511d43/212x175m.jpg" class="huxing-img"></a>
				<h4 class="span-huxing">120㎡户型 </h4>

			</div>
			<div class="huxing-div">
				<a href="#" class="huxing-a">
				<img src="https://pic4.ajkimg.com/display/xinfang/5c73e06957383286442edd35f9511d43/212x175m.jpg" class="huxing-img"></a>
				<h4 class="span-huxing">120㎡户型 </h4>

			</div> 
		</div>
</div>
</div>
</template>
<script type="text/javascript">
	export default {
		data (){
			let dataBus ={
				houseData:""
			}

			this.$a.get(`http://localhost:8081/api/house/${this.$route.params.id}`).then(res=>{
				let json =res.data
				if(res.err){
					alert('出错了')//自己加的
				}else{
					dataBus.houseData=json.data;
				}
			},err =>{
				alert('请求出错'+err)
			})
			return dataBus;
		}
	}
</script>